<?php
namespace components\frame\template;
class asset extends \api\frame\core{
    public $config;
    public $class;
    public $tpl;
    public function __construct($config){
        $this->config = $config;
        $name = explode("\\", get_called_class());
        $this->class = $name[1];
        $path = array('default' => ASSET_PATH. '/templates/' . $this->config['template']['default'],
            'compile' => ASSET_PATH. '/templates/system');
        $this->setTplObject($path);
    }
    protected function getTplFile($template) {
        if($template == null){
            $template = $this->class."/index"; 
        }else{
            $template = $this->class.'/'.$template;
        }
        return $template;
    }
}

?>
